.class Lcom/burstly/lib/component/DebugView;
.super Landroid/view/View;
.source "DebugView.java"


# instance fields
.field private final mController:Lcom/burstly/lib/component/AdaptorController;

.field private mDebugText:Ljava/lang/StringBuilder;

.field private mDeltaRowOffset:I

.field private mPaint:Landroid/graphics/Paint;

.field private mParentHeight:I

.field private mParentWidth:I

.field private mRowOffset:I


# direct methods
.method constructor <init>(Landroid/content/Context;Lcom/burstly/lib/component/AdaptorController;)V
    .locals 2
    .parameter "context"
    .parameter "controller"

    .prologue
    .line 81
    invoke-direct {p0, p1}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    .line 82
    iput-object p2, p0, Lcom/burstly/lib/component/DebugView;->mController:Lcom/burstly/lib/component/AdaptorController;

    .line 83
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/burstly/lib/component/DebugView;->setWillNotDraw(Z)V

    .line 84
    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V

    iput-object v0, p0, Lcom/burstly/lib/component/DebugView;->mPaint:Landroid/graphics/Paint;

    .line 85
    iget-object v0, p0, Lcom/burstly/lib/component/DebugView;->mPaint:Landroid/graphics/Paint;

    const/high16 v1, -0x100

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V

    .line 86
    iget-object v0, p0, Lcom/burstly/lib/component/DebugView;->mPaint:Landroid/graphics/Paint;

    const/high16 v1, 0x4040

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 87
    iget-object v0, p0, Lcom/burstly/lib/component/DebugView;->mPaint:Landroid/graphics/Paint;

    const/high16 v1, 0x4220

    invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextSize(F)V

    .line 88
    const/16 v0, 0x14

    invoke-static {v0}, Lcom/burstly/lib/util/Utils;->scale(I)F

    move-result v0

    float-to-int v0, v0

    iput v0, p0, Lcom/burstly/lib/component/DebugView;->mRowOffset:I

    .line 89
    const/16 v0, 0xf

    invoke-static {v0}, Lcom/burstly/lib/util/Utils;->scale(I)F

    move-result v0

    float-to-int v0, v0

    iput v0, p0, Lcom/burstly/lib/component/DebugView;->mDeltaRowOffset:I

    .line 90
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    iput-object v0, p0, Lcom/burstly/lib/component/DebugView;->mDebugText:Ljava/lang/StringBuilder;

    .line 91
    return-void
.end method

.method private processLine(Landroid/graphics/Canvas;Ljava/lang/String;)V
    .locals 1
    .parameter "canvas"
    .parameter "line"

    .prologue
    .line 118
    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, v0}, Lcom/burstly/lib/component/DebugView;->processLine(Landroid/graphics/Canvas;Ljava/lang/String;Z)V

    .line 119
    return-void
.end method

.method private processLine(Landroid/graphics/Canvas;Ljava/lang/String;Z)V
    .locals 3
    .parameter "canvas"
    .parameter "line"
    .parameter "show"

    .prologue
    .line 122
    if-eqz p3, :cond_0

    .line 123
    const/high16 v0, 0x4120

    iget v1, p0, Lcom/burstly/lib/component/DebugView;->mRowOffset:I

    int-to-float v1, v1

    iget-object v2, p0, Lcom/burstly/lib/component/DebugView;->mPaint:Landroid/graphics/Paint;

    invoke-virtual {p1, p2, v0, v1, v2}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 125
    :cond_0
    iget v0, p0, Lcom/burstly/lib/component/DebugView;->mRowOffset:I

    iget v1, p0, Lcom/burstly/lib/component/DebugView;->mDeltaRowOffset:I

    add-int/2addr v0, v1

    iput v0, p0, Lcom/burstly/lib/component/DebugView;->mRowOffset:I

    .line 126
    iget-object v0, p0, Lcom/burstly/lib/component/DebugView;->mDebugText:Ljava/lang/StringBuilder;

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "\n"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 127
    return-void
.end method


# virtual methods
.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 7
    .parameter "canvas"

    .prologue
    .line 95
    invoke-super {p0, p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V

    .line 96
    const/4 v5, -0x1

    invoke-virtual {p1, v5}, Landroid/graphics/Canvas;->drawColor(I)V

    .line 97
    iget-object v5, p0, Lcom/burstly/lib/component/DebugView;->mController:Lcom/burstly/lib/component/AdaptorController;

    invoke-virtual {v5}, Lcom/burstly/lib/component/AdaptorController;->getCurrentAdData()Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;

    move-result-object v2

    .line 98
    .local v2, currentAdData:Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;
    invoke-virtual {v2}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getCrid()Ljava/lang/Integer;

    move-result-object v5

    invoke-static {v5}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    .line 99
    .local v1, crid:Ljava/lang/String;
    iget-object v5, p0, Lcom/burstly/lib/component/DebugView;->mDebugText:Ljava/lang/StringBuilder;

    const/4 v6, 0x0

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->setLength(I)V

    .line 100
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "network: "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    iget-object v6, p0, Lcom/burstly/lib/component/DebugView;->mController:Lcom/burstly/lib/component/AdaptorController;

    invoke-virtual {v6}, Lcom/burstly/lib/component/AdaptorController;->getNetworkName()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    const/4 v6, 0x1

    invoke-direct {p0, p1, v5, v6}, Lcom/burstly/lib/component/DebugView;->processLine(Landroid/graphics/Canvas;Ljava/lang/String;Z)V

    .line 101
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "crid: "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {p0, p1, v5}, Lcom/burstly/lib/component/DebugView;->processLine(Landroid/graphics/Canvas;Ljava/lang/String;)V

    .line 102
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "Actual size (WxH): "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    iget v6, p0, Lcom/burstly/lib/component/DebugView;->mParentWidth:I

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    invoke-static {v6}, Lcom/burstly/lib/util/Utils;->scaleToDip(Ljava/lang/Integer;)Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "x"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    iget v6, p0, Lcom/burstly/lib/component/DebugView;->mParentHeight:I

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    invoke-static {v6}, Lcom/burstly/lib/util/Utils;->scaleToDip(Ljava/lang/Integer;)Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {p0, p1, v5}, Lcom/burstly/lib/component/DebugView;->processLine(Landroid/graphics/Canvas;Ljava/lang/String;)V

    .line 104
    iget-object v5, p0, Lcom/burstly/lib/component/DebugView;->mController:Lcom/burstly/lib/component/AdaptorController;

    invoke-virtual {v5}, Lcom/burstly/lib/component/AdaptorController;->getCurrentState()Lcom/burstly/lib/component/ComponentState;

    move-result-object v5

    invoke-virtual {v5}, Lcom/burstly/lib/component/ComponentState;->getFullResponse()Lcom/burstly/lib/network/beans/ResponseBean;

    move-result-object v3

    .line 105
    .local v3, fullResponse:Lcom/burstly/lib/network/beans/ResponseBean;
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "Zone size (WxH): "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v3}, Lcom/burstly/lib/network/beans/ResponseBean;->getWidth()Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "x"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v3}, Lcom/burstly/lib/network/beans/ResponseBean;->getHeight()Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {p0, p1, v5}, Lcom/burstly/lib/component/DebugView;->processLine(Landroid/graphics/Canvas;Ljava/lang/String;)V

    .line 106
    invoke-virtual {v2}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getAdType()Lcom/burstly/lib/network/beans/ResponseBean$ResponseData$AdType;

    move-result-object v0

    .line 107
    .local v0, adType:Lcom/burstly/lib/network/beans/ResponseBean$ResponseData$AdType;
    if-eqz v0, :cond_0

    .line 108
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "AdType size (WxH): "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v0}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData$AdType;->getWidth()Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "x"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v0}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData$AdType;->getHeight()Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {p0, p1, v5}, Lcom/burstly/lib/component/DebugView;->processLine(Landroid/graphics/Canvas;Ljava/lang/String;)V

    .line 109
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "ormma/mraid/rewards: "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-static {v0}, Lcom/burstly/lib/util/Utils;->isOrmma(Lcom/burstly/lib/network/beans/ResponseBean$ResponseData$AdType;)Z

    move-result v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "/"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-static {v0}, Lcom/burstly/lib/util/Utils;->isMraid(Lcom/burstly/lib/network/beans/ResponseBean$ResponseData$AdType;)Z

    move-result v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "/"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v2}, Lcom/burstly/lib/network/beans/ResponseBean$ResponseData;->getDataType()Ljava/lang/Integer;

    move-result-object v6

    invoke-static {v6}, Lcom/burstly/lib/util/Utils;->isRewards(Ljava/lang/Integer;)Z

    move-result v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {p0, p1, v5}, Lcom/burstly/lib/component/DebugView;->processLine(Landroid/graphics/Canvas;Ljava/lang/String;)V

    .line 112
    :cond_0
    iget-object v5, p0, Lcom/burstly/lib/component/DebugView;->mController:Lcom/burstly/lib/component/AdaptorController;

    invoke-virtual {v5}, Lcom/burstly/lib/component/AdaptorController;->getCurrentState()Lcom/burstly/lib/component/ComponentState;

    move-result-object v5

    invoke-virtual {v5}, Lcom/burstly/lib/component/ComponentState;->getRequestData()Lcom/burstly/lib/network/beans/RequestData;

    move-result-object v4

    .line 113
    .local v4, requestData:Lcom/burstly/lib/network/beans/RequestData;
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "p/z: "

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v4}, Lcom/burstly/lib/network/beans/RequestData;->getPublisher()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, "/"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v4}, Lcom/burstly/lib/network/beans/RequestData;->getZone()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-direct {p0, p1, v5}, Lcom/burstly/lib/component/DebugView;->processLine(Landroid/graphics/Canvas;Ljava/lang/String;)V

    .line 114
    const/16 v5, 0x14

    invoke-static {v5}, Lcom/burstly/lib/util/Utils;->scale(I)F

    move-result v5

    float-to-int v5, v5

    iput v5, p0, Lcom/burstly/lib/component/DebugView;->mRowOffset:I

    .line 115
    return-void
.end method

.method protected onMeasure(II)V
    .locals 3
    .parameter "widthMeasureSpec"
    .parameter "heightMeasureSpec"

    .prologue
    .line 141
    invoke-virtual {p0}, Lcom/burstly/lib/component/DebugView;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    check-cast v0, Landroid/view/ViewGroup;

    .line 142
    .local v0, parent:Landroid/view/ViewGroup;
    if-eqz v0, :cond_0

    .line 143
    invoke-virtual {v0}, Landroid/view/ViewGroup;->getHeight()I

    move-result v1

    iput v1, p0, Lcom/burstly/lib/component/DebugView;->mParentHeight:I

    .line 144
    invoke-virtual {v0}, Landroid/view/ViewGroup;->getWidth()I

    move-result v1

    iput v1, p0, Lcom/burstly/lib/component/DebugView;->mParentWidth:I

    .line 145
    iget v1, p0, Lcom/burstly/lib/component/DebugView;->mParentWidth:I

    iget v2, p0, Lcom/burstly/lib/component/DebugView;->mParentHeight:I

    invoke-virtual {p0, v1, v2}, Lcom/burstly/lib/component/DebugView;->setMeasuredDimension(II)V

    .line 149
    :goto_0
    return-void

    .line 147
    :cond_0
    invoke-super {p0, p1, p2}, Landroid/view/View;->onMeasure(II)V

    goto :goto_0
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 1
    .parameter "event"

    .prologue
    .line 131
    const/4 v0, 0x1

    return v0
.end method

.method public toString()Ljava/lang/String;
    .locals 1

    .prologue
    .line 136
    iget-object v0, p0, Lcom/burstly/lib/component/DebugView;->mDebugText:Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
